$(function(){
	$("html").niceScroll({
    zindex:"9999",
      cursorborder:'0'
    });	
  $("a").addClass("animsition-link");
  $(".animsition").animsition({
    inClass: 'fade-in-up-sm',
    outClass: 'fade-out-up-sm',
    inDuration: 1500,
    outDuration: 800,
    linkElement: '.animsition-link',
    // e.g. linkElement: 'a:not([target="_blank"]):not([href^="#"])'
    loading: true,
    loadingParentElement: 'body', //animsition wrapper element
    loadingClass: 'animsition-loading',
    loadingInner: '', // e.g '<img src="loading.svg" />'
    timeout: false,
    timeoutCountdown: 5000,
    onLoadEvent: true,
    browser: [ 'animation-duration', '-webkit-animation-duration'],
    // "browser" option allows you to disable the "animsition" in case the css property in the array is not supported by your browser.
    // The default setting is to disable the "animsition" in a browser that does not support "animation-duration".
    overlay : false,
    overlayClass : 'animsition-overlay-slide',
    overlayParentElement : 'body',
    transition: function(url){ window.location.href = url; }
  }).on('animsition.inStart', function(){
    //alert($('html').has('.detailST').length);
   if($('html').has('.detailST').length){
     $(".p_articlesA:has(div[title='"+$('.p_breadcrumbCurrent').prev().prev().find('.font span').text()+"'])").addClass("clicked");
   }else{
     if($('.clicked').length < 1){
       $(".p_articlesA:has(div[title='"+$('.p_breadcrumbCurrent .font span').text()+"'])").addClass("clicked");
     }
   }
  });
});
